package com.itheima.springboot_24_mq.controller;

import com.itheima.springboot_24_mq.service.MessageService;
import com.itheima.springboot_24_mq.service.impl.rabbitmq.direct.MessageServiceRabbitmqImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/msgs")
public class MessageController {

    @Autowired
    private MessageService messageService;
    @GetMapping
    public String doMessage(){
        String id=messageService.doMessage();
        return id;
    }
}
